<script type="text/javascript" language="javascript">
var xmlHttp //Ambil XML HTTP untuk berbagai browser
function GetXmlHttpObject()
{
var xmlHttp=null;
try
 {
 // Firefox, Opera 8.0+, Safari
 xmlHttp=new XMLHttpRequest();
 }
catch (e)
 {
 //Internet Explorer
 try
  {
  xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
  }
 catch (e)
  {
  xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
 }
return xmlHttp;
}
// ================================================================================== kabDropdownOr(str) == start
function kabDropdown(str)
{ 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
	var url="<?php echo site_url().'home/ajax_showKab'?>";
	url=url+"/"+str;
	//url=url+"&sid="+Math.random();
	xmlHttp.onreadystatechange=stateChangedb;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}

function stateChangedb() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
 { 
 document.getElementById("txtHint2").innerHTML=xmlHttp.responseText 
 } 
}
// ================================================================================== kabDropdownOr(str) == finish

// ================================================================================== showBag(str) == start
function showBag(str)
{ 
xmlHttp=GetXmlHttpObject()
if (xmlHttp==null)
 {
 alert ("Browser does not support HTTP Request")
 return
 }
	var url="<?php echo site_url().'home/ajax_showBag'?>";
	url=url+"/"+str;
	//url=url+"&sid="+Math.random();
	xmlHttp.onreadystatechange=ubahBag;
	xmlHttp.open("GET",url,true);
	xmlHttp.send(null);
}
</script>



<!-- date picker-->

				<script language="javascript" type="text/javascript">
$(document).ready(function() {

						   $("#accordion3").msAccordion({defaultid:1, vertical:true});
						   $("#accordion4").msAccordion({defaultid:1, vertical:true, event:'mouseover'});
						   }
						   )
</script>

<script>
	$(function() {
		$( "#datepicker" ).datepicker({
			changeMonth: true,
			changeYear: true,
			minDate: 0,
			dateFormat: 'yy-mm-dd',
			yearRange: "<?php echo '1lik960:'.date('Y');?>"
		});
		
		$("#datetimepicker1").datetimepicker({
			changeMonth: true,
			changeYear: true,
			hour: 13,
			minute: 15,
			stepMinute: 5,
			dateFormat: 'yy-mm-dd',
			timeFormat: 'hh:mm:ss',
			numberOfMonths: 3,
			minDate: 0,
			maxDate: 100	
		});
		$("#datetimepicker2").datetimepicker({
			changeMonth: true,
			changeYear: true,
			hour: 13,
			minute: 15,
			stepMinute: 5,
			dateFormat: 'yy-mm-dd',
			timeFormat: 'hh:mm:ss',
			numberOfMonths: 3,
			minDate: 0,
			maxDate: 100
		});
		$("#timepicker").timepicker({
			stepMinute: 5
		});
	});
</script>
		   
	 <div id="bottom_content">
		<div class="span-8">
			<div class="order_image_content">
		<img src="<?php echo base_url() ?>assets/images/event/<?php echo $row->image_url_thumb ;?>" width="290" height="360">
			

			</div>
		</div>
		
		<div class="span-16 last">
			<div class="detail_content">
            
<h3>CHECKOUT</h3>
						<p>EVENT : <?php echo $row->nm_event;?></p>
			
			<form action="<?php echo site_url().'home/checkout/'.$row->id_event ?>" method="post" class="login_form">	
            <table width="1" border="0" cellpadding="0">
              <tr>
                <th>No</th>
                <th>Kelas</th>
                <th>Potongan Harga</th>
                <th>Harga</th>
				
              </tr>
	<?php 
	$no=1;
	foreach ($query as $row){?>		  
              <tr>
                <td><?php echo $no; ?></td>
                <td><?php echo $row['class_name'] ?></td>
				<td><?php echo $row['percent_disc'] ?>%</td>
				<td><?php echo $row['ammount'] ?></td>
              </tr>
	<?php 
	$no++;
	} ?>		
			   <tr>
                <td></td>

				  <td></td>
                <td>TOTAL</td>
			<?php foreach ($rows as $res){ ?>	
                <td>Rp.<?php echo $res['total'] ?></td>
			<?php } ?>	
              </tr>
            </table>
			
				<div id="accordion3" class="accordionWrapper">
				<div class="set set1">
					<div class="title"><div class="title_accor1">NON MEMBER CHECKOUT</div></div>
					<div class="content">
						<div class="content_accor">
							<form action="" method="post" class="login_form">
								<ul class="login">
								<h3>Data Diri</h3>
                                	<?php echo form_error('user_login', '<p class="field_error">', '</p>'); ?>
									<li class="login">
										<label class="text_form">Nama</label>
										<input type="text" name="user_login" class="text_form" size="30"value="">
									</li>
                                    <?php echo form_error('date_of_birth', '<p class="field_error">', '</p>'); ?>
									<li class="login">
										<label class="text_form">Tanggal Lahir</label>
										<input type="text" id="datepicker" class="text_form" size="30" name="date_of_birth" readonly="readonly">
									</li>
                                    <?php echo form_error('sex', '<p class="field_error">', '</p>'); ?>
									<li class="login">
										<label class="text_form">Jenis Kelamin</label>
										<?php echo sexDropdown(set_value('sex')) ;?>
									</li>
                                    <?php echo form_error('no_hp', '<p class="field_error">', '</p>'); ?>
									<li class="login">
										<label class="text_form">No HP Aktif</label>
										<input type="text" name="no_hp" class="text_form" size="30">
									</li>
                                    <?php echo form_error('alamat', '<p class="field_error">', '</p>'); ?>
									<li class="login">
										<label class="text_form">Alamat</label>
										<textarea size="50" name="alamat"></textarea>
										
									</li>
                                    <?php echo form_error('id_provinsi', '<p class="field_error">', '</p>'); ?>
									<li class="login">
										<label class="text_form">Provinsi</label>
										<?php echo provDropdown(set_value('id_provinsi'));?>
									</li>
                                    <?php echo form_error('id_kab', '<p class="field_error">', '</p>'); ?>
									<li class="login">
										<label class="text_form">Kabupaten</label>
										<div id="txtHint2">
										<?php echo kabDropdown(set_value('id_kab'),set_value('id_provinsi'));?>
										</div>
									</li>
                                    <?php echo form_error('kodepos', '<p class="field_error">', '</p>'); ?>
									<li class="login">
										<label class="text_form">Kodepos</label>
										<input type="text" name="kodepos" class="text_form" size="30" value="">
									</li>
                                    <?php echo form_error('email', '<p class="field_error">', '</p>'); ?>
									<li class="login">
										<label class="text_form">Email</label>
										<input type="text" name="email" class="text_form" size="30" value="">
									</li>
                                    <?php echo form_error('password', '<p class="field_error">', '</p>'); ?>
									<li class="login">
										<label class="text_form">Password</label>
										<input type="password" name="password" class="text_form" size="30" value="">
									</li>
                                    <?php echo form_error('bank_id', '<p class="field_error">', '</p>'); ?>
									<li class="login">
										<label class="text_form">Rekening Bank</label>
										<?php echo dropDownBank(set_value('bank_id'))?>
									</li>
                                   
									<li class="login">
										<label class="text_form">Kode Marketing</label>
										<input type="text" name="kode_marketing" class="text_form" size="30">
									</li>
									<!--<li class="login">
										<label class="text_form">Masukan kode</label>
										<input type="text" name="user_password" class="text_form" size="30" value="CHAPTA">
									</li>-->
									<li class="login">
										<input type="submit" value="Kirim" class="big" > 
									</li>
									
								</ul>
						 
							</form>
						</div>
					</div>
				</div>
				<div class="set set2">
					<div class="title"><div class="title_accor2">MEMBER CHECKOUT</div></div>
					<div class="content">
						<div class="content_accor">
							<form action="" method="post" class="login_form">
								<ul class="login">
									<li class="login">
										<label class="login">Email</label>
										<input type="text" name="user_login" class="text_login" size="30"value="">
									</li>
									<li class="login">
										<label class="login">Password</label>
										<input type="password" name="user_password" class="text_login" size="30" value="">
									</li>
									<li class="login">
										<input type="submit" value="Login" class="big" >  <a href="#">Forgot your password</a>
									</li>
									
								</ul>
						 
							</form>
							
						</div>
					</div>
				</div>
				</div>
				

			
			</div>
		</div>
		
		
	 </div>
 